package aapilast3;

import java.lang.reflect.Method;

public class ReflectDemo6 {
    public static void main(String[] args) throws Exception {
        Class<Person> cls = Person.class;
        Object obj = cls.newInstance();
        Method method = cls.getDeclaredMethod("heHe");
        method.setAccessible(true);
        method.invoke(obj);
        method.setAccessible(false);
    }
}
